<html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>Table</title>
		<link rel="stylesheet" href="__STATIC__/plugins/layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="__CSS__/global.css" media="all">
		<link rel="stylesheet" href="__STATIC__/plugins/font-awesome/css/font-awesome.min.css">
		<link rel="stylesheet" href="__CSS__/table.css" />
	    <script type="text/javascript" charset="utf-8" src="__JS__/ueditor.config.js"></script>
	    <script type="text/javascript" charset="utf-8" src="__JS__/ueditor.all.min.js"> </script>
        <script type="text/javascript" charset="utf-8" src="__JS__/lang/zh-cn/zh-cn.js"></script>



	</head>
	<body>
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
				<legend>
				  	{if  condition="($arr.id)"}
			       
				编辑信用卡
		  			{else/}
				添加信用卡
		  			{/if}
			</legend>
		</fieldset>
		<form action="__ADMIN__/bank/add" method="post">
			<div class="layui-form-item">
					<label class="layui-form-label">ico:</label>
					<div class="layui-input-block">
						<input name="ico" id="ico" lay-verify="title" autocomplete="off" placeholder="" class="layui-input" value="{$arr.ico}" type="text">
				  	<button type="button" class="layui-btn test1"res = "ico" style="float: right;" >选择图片</button>
				  	<div id="ico_img">
				  		{if  condition="($arr.ico)"}
				  		<img src="__STATIC__/{$arr.ico}" url="{$arr.ico}" width="100px" height="100px">
				  		{/if}
				  	</div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">logo:</label>
					<div class="layui-input-block">
						<input name="logo" id="logo" lay-verify="title" autocomplete="off" placeholder="" value="{$arr.logo}" class="layui-input" type="text">
				  	<button type="button" class="layui-btn test1"  res = "logo" style="float: right;" >选择图片</button>
				  	<div id="logo_img">
			  			{if  condition="($arr.logo)"}
				  		<img src="__STATIC__/{$arr.logo}" url="{$arr.logo}" width="100px" height="100px">
				  		{/if}
				  	</div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">银行名称:</label>
					<div class="layui-input-block">
						<input name="bankname" lay-verify="title" autocomplete="off" placeholder="" value="{$arr.bankname}" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">卡片名称:</label>
					<div class="layui-input-block">
						<input name="card_name" lay-verify="title" autocomplete="off" placeholder="" value="{$arr.card_name}" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">虚拟人数:</label>
					<div class="layui-input-block">
						<input name="vir_number"  lay-verify="title" autocomplete="off" placeholder="" value="{$arr.vir_number}"  class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">tag:</label>
					<div class="layui-input-block">
						<input name="tag"  lay-verify="title" value="{$arr.tag}" autocomplete="off" placeholder="高额,秒批,热门 多个标签英文逗号隔开" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">奖金:</label>
					<div class="layui-input-block">
						<input name="jiangjin"  lay-verify="title" value="{$arr.jiangjin}"  autocomplete="off" placeholder="仅供前台显示使用。例如15元，，10%" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">佣金介绍</label>
					<div class="layui-input-block">
						<textarea class="content" name="yjjieshao" id="content">{$arr.yjjieshao}</textarea>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">提示:</label>
					<div class="layui-input-block">
						<input name="tishi"  lay-verify="title" autocomplete="off" value="{$arr.tishi}" placeholder="输入描述" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">办卡详情</label>
					<div class="layui-input-block">
						<textarea class="xiangqing" name="xiangqing" id="xiangqing">{$arr.content.xiangqing}</textarea>
					</div>
				</div>
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">申请指南</label>
					<div class="layui-input-block">
						<textarea class="zhinan" name="zhinan" id="zhinan">{$arr.content.zhinan}</textarea>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">申请视频地址:</label>
					<div class="layui-input-block">
						<input name="video"  lay-verify="title" autocomplete="off" value="{$arr.video}"  placeholder="视频地址" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">申请URL:</label>
					<div class="layui-input-block">
						<input name="url"  lay-verify="title" autocomplete="off" value="{$arr.url}"  placeholder="填入完整URL" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">查询URl:</label>
					<div class="layui-input-block">
						<input name="url2"  lay-verify="title" autocomplete="off" value="{$arr.url2}"  placeholder="查询办卡进度填入完整URL" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">海报id:</label>
					<div class="layui-input-block">
						<input name="poster_id"  lay-verify="title" autocomplete="off" value="{$arr.poster_id}"  placeholder="" class="layui-input" type="text">
					</div>
				</div>	
				<div class="layui-form-item">
					<label class="layui-form-label">排序:</label>
					<div class="layui-input-block">
						<input name="rank"  lay-verify="title" autocomplete="off" value="{$arr.rank}" placeholder="排序越大越靠前" class="layui-input" type="text">
					</div>
				</div>
				  <div class="layui-form-item">
				    <label class="layui-form-label">是否发布</label>
				    <div class="layui-input-block">
				      <select name="status" lay-verify="required">
			  			{if  condition="($arr.status == 1)"}
  						 <option value="0" >否</option >
				        <option value="1" selected>是</option>
			  			{else/}

				        <option value="0" selected >否</option >
				        <option value="1">是</option>
			  			{/if}
				      
				      </select>
				    </div>
				  </div> 
				   <div class="layui-form-item">
				    <label class="layui-form-label">推荐</label>
				    <div class="layui-input-block">
				      <select name="tuijian" lay-verify="required">
			        	{if  condition="($arr.tuijian == 1)"}
  						 <option value="0" >否</option >
				        <option value="1" selected>是</option>
			  			{else/}

				        <option value="0" selected >否</option >
				        <option value="1">是</option>
			  			{/if}
				      
				      </select>
				    </div>
				  </div>
  				   <div class="layui-form-item">
				    <label class="layui-form-label">模式</label>
				    <div class="layui-input-block">
				      <select name="type" lay-verify="required">
				      	{if  condition="($arr.fy.type == 1)"}
				    	<option value="1" selected>百分比</option >
				        <option value="2">固定金额</option>
			  			{else/}

				         <option value="1">百分比</option >
				        <option value="2" selected>固定金额</option>
			  			{/if}
				    
				
				      </select>
				    </div>
				  </div>
		  			<div class="layui-form-item">
					<label class="layui-form-label">返现:</label>
					<div class="layui-input-block">
						<input name="sx"  lay-verify="title" autocomplete="off" value="{$arr.fy.sx}" placeholder="元或%" class="layui-input" type="text">
				 
					</div>
				</div>
				<input type="hidden" name="id" value="{$arr.id}">
				<div class="layui-input-block">
					<input type="submit" class="layui-btn" value="提交">
				</div>
		</form>
		<script type="text/javascript" src="__STATIC__/plugins/layui/layui.js"></script>
			<script type="text/javascript" src="__STATIC__/datas/nav.js"></script>	
			<script src="__JS__/index.js"></script>
		    <script src="__JS__/jquery.js"></script>
	</body>
</html>
<script >
	layui.config({
			base: '__STATIC__/plugins/layui/modules/'
		});

		layui.use(['form', 'layedit', 'laydate','icheck', 'laypage','layer'], function() {
		var 	layer = layui.layer,
			layedit = layui.layedit,
			laydate = layui.laydate;


		var editIndex = layedit.build('LAY_demo_editor');

		 $('.test1').on('click', function() {
		 	var type = $(this).attr("res");
			  layer.open({
			      type: 2,
				      title: '图片',
				      maxmin: true,
				      offset: 't',
				      anim: 2,
				      shadeClose: true, //点击遮罩关闭层
			      area : ['600px' , '520px'],
			      content: '__ADMIN__/bank/img?type='+type
			   });
		 });

		})

</script>
  <script type="text/javascript">
        UE.getEditor('content',{initialFrameWidth:800,initialFrameHeight:200})
        UE.getEditor('xiangqing',{initialFrameWidth:800,initialFrameHeight:200})
        UE.getEditor('zhinan',{initialFrameWidth:800,initialFrameHeight:200})
</script>